<?php

namespace app\common\message;

class Mail
{
    protected $message;
    public function sendSMSInform($phone,$code)
    {
        $data = [
            "signName" => "长沙福地科技有限公司",
            "templateCode" => "SMS_468210149",
            "phoneNumbers" => $phone,
            "templateParam" => "{\"code\":\"$code\"}"
        ];
        $result = Message::sendMessage($data);
        if($result->body->code == 'OK'){
            $this->message = $result->body->code;
            return true;
        }else{
            $this->message = $result->body->message;
            return false;
        }
    }
}
